<template>
<!-- 专题详情 -->
  <div>
    <!-- 头部 -->
    <div class="details_header">
      <div class="header_logo">
        <van-icon @click="back" name="arrow-left" size="0.4rem" />
      </div>
      <div class="header_title">专栏详情</div>
    </div>
    <!-- 内容 -->
    <div class="details_body">
      <p class="details_body_title" v-html="wzdeta.title"></p>
      <img :src="wzdeta.pic" width="100%" />
      <p v-html="wzdeta.content"></p>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      wzdeta: []
    };
  },
  mounted() {
    let id = this.$route.query.id;
    this.$APIClient
      .getArticleDetails({
        params: {
          id
        }
      })
      .then(res => {
        //检测
        // console.log(res.data.data);
        //赋值
        this.wzdeta = res.data.data;
      })
      .catch(error => {
        console.log(error);
      });
  },
  methods: {
    back() {
      window.history.back();
    }
  }
};
</script>



<style scoped>
.details_header {
  width: 100%;
  height: 1rem;
  display: flex;
  justify-content: left;
  position: fixed;
  top: 0;
  background-color: #fff;
  z-index: 7;
}
.header_logo {
  width: 20%;
  margin-left: 5%;
  text-align: left;
  line-height: 1.2rem;
}
.header_title {
  width: 60%;
  text-align: center;
  line-height: 1rem;
  font-size: 0.4rem;
}
.details_body {
  margin-top: 1.1rem;
}
.details_body p {
  font-size: 0.24rem;
}
.details_body_title {
  text-align: center;
  font-size: 0.5rem;
  padding-bottom: 0.4rem;
}
.details_body img {
  padding: 0.2rem;
  box-sizing: border-box;
}
</style>